import collections
class Solution(object):
    def findLeastNumOfUniqueInts(self, arr, k):
        d = collections.Counter(arr)
        v = list(d.values())
        v.sort()
        now = 0
        index = 0
        n = len(v)
        while index < n:
            if now + v[index] <= k:
                now += v[index]
                index += 1
            else:
                break
        return n - index
